import rps_main as rm
import img_orient as io
import time
from naoqi import ALProxy

IP = "192.168.10.151"
PORT = 9559

tts = ALProxy("ALTextToSpeech", IP, PORT)
#set the address of the nao ip address in img_orient
tts.setVolume(1)

while True:
    str = rm.rps_classify()

    #nothing was found, dont run the rest of the app
    if str == 'nothing':
        continue

    #we have found something! say it
    #we can just do tts.say(str), but the nao is set to dutch
    #we do a translation here as the strings are englishs
    if str == rm.directories[0]:
        tts.say("steen")
    elif str == rm.directories[1]:
        tts.say("papier")
    elif str == rm.directories[2]:
        tts.say("schaar")
    #elif str == rm.directories[3]:
    #    tts.say("Groen")

    time.sleep(0.5)       #Slaap .5 sec

